Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use MPOs for skinning #717

Merged
merged 1 commit into from Sep 9, 2017
Merged

Use MPOs for skinning #717

merged 1 commit into from Sep 9, 2017

Conversation

shadowislord
Copy link
Member

@shadowislord shadowislord commented Sep 8, 2017

Fixes the annoying "Material instances cannot be shared when hardware skinning is used" error

Copy link
Contributor

@Nehon Nehon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, this was pretty annoying.
I just have one comment.

@@ -547,10 +507,9 @@ private void applySkinning(Mesh mesh, Matrix4f[] offsetMatrices) {
fnb.rewind();

// get boneIndexes and weights for mesh
indexReader.setBuffer(mesh.getBuffer(Type.BoneIndex).getData());
IndexBuffer ib = IndexBuffer.wrapIndexBuffer(mesh.getBuffer(Type.BoneIndex).getData());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't that create a new instance of the wrapper on each frame ?

@Nehon Nehon merged commit bf18ef3 into master Sep 9, 2017
@Nehon Nehon deleted the mpo-skinning branch September 9, 2017 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants